Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a module and class for handling sky grids for pycbc_multi_inspiral #4741

Merged
merged 10 commits into from
Sep 12, 2024

Conversation

titodalcanton
Copy link
Contributor

Calculating the coherent network SNR (pycbc_multi_inspiral) requires a grid of points in the sky. This adds a module and class to manage such grids in a more centralized way.

Standard information about the request

This is mostly refactoring existing code into a new module. This change affects PyGRB but does not change any output.

Motivation

pycbc_multi_inspiral is a very long script at this point, and pycbc_make_sky_grid might also become very long as we implement various algorithms for placing sky grids available in the literature. Centralizing the management of sky grids, including reading/writing them from/to files, seems beneficial.

Contents

I added a pycbc.tmpltbank.sky_grid module which currently contains a SkyGrid class, with methods to read and write sky grids from HDF5 files, calculate the antenna patterns and time delays over the grid for a network of detectors, and handle CLI arguments related to sky grids.

Links to any issues or associated PRs

None.

Testing performed

I wrote a short script to plot the antenna patterns and time delays over a sky grids of random points for various detectors, and visually checked that those made sense:

image

Additional notes

None.

  • The author of this pull request confirms they will adhere to the code of conduct

@titodalcanton
Copy link
Contributor Author

Note that I posed a couple design questions in the constructor of SkyGrid, and that I want to add explicit units and angular convention to the docstring, which I have not done yet.

@pannarale pannarale added the PyGRB PyGRB development label May 12, 2024
Copy link
Contributor

@spxiwh spxiwh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Francesco should probably give final approval for this, but it all looks good to me. I left comments in response to the questions raised.

pycbc/tmpltbank/sky_grid.py Outdated Show resolved Hide resolved
pycbc/tmpltbank/sky_grid.py Show resolved Hide resolved
@titodalcanton
Copy link
Contributor Author

@pannarale this is now ready for your review.

@titodalcanton titodalcanton merged commit fc4c210 into gwastro:master Sep 12, 2024
30 checks passed
@titodalcanton titodalcanton deleted the sky_grid branch September 12, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyGRB PyGRB development
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants